package cn.mickey.exchange.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 创建自定义线程池配置类
 *
 * @author mickey
 */
@ConfigurationProperties(prefix = "task.pool")
public class TaskThreadPoolProperties {

    /**
     * 核心线程池数量
     */
    private int corePoolSize;
    /**
     * 最大线程
     */
    private int maxPoolSize;
    /**
     * 缓存队列条数
     */
    private int queueCapacity;
    /**
     * 允许的空闲时间
     */
    private int keepAliveSeconds;
    /**
     * 线程名称前缀
     */
    private String threadNamePrefix;

    public int getCorePoolSize() {
        return corePoolSize;
    }

    public void setCorePoolSize(int corePoolSize) {
        this.corePoolSize = corePoolSize;
    }

    public int getMaxPoolSize() {
        return maxPoolSize;
    }

    public void setMaxPoolSize(int maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
    }

    public int getQueueCapacity() {
        return queueCapacity;
    }

    public void setQueueCapacity(int queueCapacity) {
        this.queueCapacity = queueCapacity;
    }

    public int getKeepAliveSeconds() {
        return keepAliveSeconds;
    }

    public void setKeepAliveSeconds(int keepAliveSeconds) {
        this.keepAliveSeconds = keepAliveSeconds;
    }

    public String getThreadNamePrefix() {
        return threadNamePrefix;
    }

    public void setThreadNamePrefix(String threadNamePrefix) {
        this.threadNamePrefix = threadNamePrefix;
    }
}
